/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uit.ieproject.utilites;

/**
 *
 * @author Maivia
 */
public class DownloadThread implements Runnable {

    private String name;
    private boolean isDownload;

    public DownloadThread(String name, boolean isDownload) {
        this.name = name;
        this.isDownload = isDownload;
    }

    @Override
    public void run() {
        if (isDownload) {
            try {
                FileUtil.saveUrl(name, "jpg");
            } catch (Exception ex) {
            }
        }
    }
}
